load c:\manoj\projects\plasma\Julia_PLP.mat;
Julia_daily = nanmean(w,2);
Julia_fday = floor(fday(:,1));
load c:\manoj\projects\plasma\HUA_PIU1.mat
HUA_daily = nanmean(HUAPIU(:,800:1200),2);
load c:\manoj\projects\plasma\solar_flux.mat
[c,ia,ib] = intersect(Julia_fday,HUA_PIU_fday);
Julia_common_hua_fday = Julia_fday(ia);
Julia_common_hua_data = Julia_daily(ia);
HUA_common_julia_fday = HUA_PIU_fday(ib);
HUA_common_julia_data = HUA_daily(ib);
[c1,ia1,ib1] = intersect(HUA_common_julia_fday,fday_euvac);
EUVAC_common_HUA_Julia_fday = fday_euvac(ib1);
EUVAC_common_HUA_Julia_data = euvac(ib1);
L = isnan(HUA_common_julia_data) | isnan(Julia_common_hua_data) | isnan(EUVAC_common_HUA_Julia_data);
HUA_common_julia_data(L) = [];
HUA_common_julia_fday(L) = [];
Julia_common_hua_data(L) = [];
Julia_common_hua_fday(L) = [];
EUVAC_common_HUA_Julia_data(L) = [];
EUVAC_common_HUA_Julia_fday(L) = [];
subplot(2,2,4);
L = EUVAC_common_HUA_Julia_data > 160 & EUVAC_common_HUA_Julia_data < 190;
[c2,c1] = plot_ls_regression(HUA_common_julia_data(L),Julia_common_hua_data(L));
axis([-50 200 -5 40]);
title(sprintf('EUVAC 160-190, CC = %5.2f',c2(2,1)));
text(80,0,sprintf('%5.2f %5.2f',c1(1),c1(2)));
ylabel('Julia Drift V_z m.s^{-1}');
xlabel('HUA_{\DeltaH} - PIU_{\DeltaH}');


subplot(2,2,3);
L = EUVAC_common_HUA_Julia_data > 130 & EUVAC_common_HUA_Julia_data < 160;
[c2,c1] =plot_ls_regression(HUA_common_julia_data(L),Julia_common_hua_data(L));
axis([-50 200 -5 40]);
title(sprintf('EUVAC 130-160, CC = %5.2f',c2(2,1)));
text(80,0,sprintf('%5.2f %5.2f',c1(1),c1(2)));
ylabel('Julia Drift V_z m.s^{-1}');
xlabel('HUA_{\DeltaH} - PIU_{\DeltaH}');

subplot(2,2,2);
L = EUVAC_common_HUA_Julia_data > 100 & EUVAC_common_HUA_Julia_data < 130;
[c2,c1] =plot_ls_regression(HUA_common_julia_data(L),Julia_common_hua_data(L));
axis([-50 200 -5 40]);
title(sprintf('EUVAC 100-130, CC = %5.2f',c2(2,1)));
text(80,0,sprintf('%5.2f %5.2f',c1(1),c1(2)));
ylabel('Julia Drift V_z m.s^{-1}');
xlabel('HUA_{\DeltaH} - PIU_{\DeltaH}');

subplot(2,2,1);
L = EUVAC_common_HUA_Julia_data > 70 & EUVAC_common_HUA_Julia_data < 100;
[c2,c1] =plot_ls_regression(HUA_common_julia_data(L),Julia_common_hua_data(L));
axis([-50 200 -5 40]);
title(sprintf('EUVAC 70-100, CC = %5.2f',c2(2,1)));
text(80,0,sprintf('%5.2f %5.2f',c1(1),c1(2)));
ylabel('Julia Drift V_z m.s^{-1}');
xlabel('HUA_{\DeltaH} - PIU_{\DeltaH}');


